package com.rimi.service;

import com.rimi.bean.Doctor;
import com.rimi.bean.User;
import com.rimi.commons.CommonResult;

import java.util.List;

/**
 * @author liHaiYang
 * @version V1.0
 * @Description: (用一句话描述该文件做什么)
 * @date 2021/6/28 16:26
 */
public interface UserService {


    User findUserByPhoneNumber(String phonenumber);

    User findUserByUserId(Integer id);

    CommonResult addUerToSql(User user);

    /**
     * 显示用户信息
     * @return
     */
    List<User> showUser();

    /**
     * 编辑用户信息
     * @param user
     * @return
     */
    CommonResult updateUser(User user);

    int deleteUserByUserId(Integer userId);

    CommonResult updateUserPasswordByUserId(Integer userId, String newPassword);

    int upLoadImg(String filename,Integer userId);

    int addDoctorByUserId(Integer doctorId, Integer userId);

    List<Doctor> showDoctorByUserId(Integer userId);

    CommonResult deleteDoctorBydoctorId(Integer doctorId);

    CommonResult registerUer(User user);
}
